// 将一个普通的对象转换为每个层级的属性都是响应式的
import { defineReavtive } from "./defineReactive";
import { def } from "./utils";
export default class Observer {
  constructor(value) {
    def(value, '__ob__', this, false)
    this.walk(value)
  }
  walk (value) {
    for (let k in value) {
      defineReavtive(value, k)
    }
  }
}